<!--有理想的地方，地狱都是天堂-->
<!--Copyright @ df81.com 版权所有-->
<!--作者: 南国老符 邮箱：1062129401@qq.com-->
{include file="public/js_ueditor" /}
<link href="{:config('template.skin')}/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
<div class="modal-header">
    <span class="modal-title"><img src="{$userRs.avatar}" class="rounded-circle mr-1" width="20" height="20" onerror="this.src='{:config('template.skin')}/img/avatar.png'"> {$userRs.nickname}</span>
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
</div>
<div class="p-2">
    <form name="form_edit" id="form_edit">
        <input type="hidden" name="signid" value="1" />
        <input type="hidden" name="tabledir" value="{$rs.tabledir}" />
        <input type="hidden" name="parentid" value="{$rs.id}" />
        <input type="hidden" name="tableid" value="{$rs.tableid}" />
        <input type="hidden" name="userid" value="{:session('userid')}" />
        <input type="hidden" name="lang" value="{$rs.lang}" />
        <div class="row">
            {volist name="replylist" id="repRs"}
                <div class="col-md-12 mb-2">
                    <div class="w-100">
                        <img src="{$repRs.avatar}" class="rounded-circle mr-1" width="20" height="20" onerror="this.src='{:config('template.skin')}/img/avatar.png'"> [ {$repRs.nickname} ] {$repRs.addtime|date='Y-m-d H:i'} {:lang('v_reply')}：
                        <!-- 编辑 -->
                        <a class="text-success mr-2 self_modal" data-modal="#modal" data-toggle="modal" href="{:url('/comment/edit',['lang'=>$lang,'id'=>$repRs['id'],'signid'=>input('signid')])}"><i class="fa fa-edit mr-1"></i>{:lang('v_edit')}</a>
                        <!-- 软删除 -->
                        <span onClick="javascript:do_ajax('','','{:url('/comment/update_signid',['lang'=>$lang,'id'=>$repRs['id'],'signid'=>9])}','');" class="text-danger cursor"><i class="fa fa-trash mr-1"></i>{:lang('v_delete')}</span>
                    </div>
                    <div class="w-100">
                        <div class="pl-4">{$repRs.content|raw}</div>
                    </div>
                </div>
            {/volist}
            {if count($replylist) > 0}<div class="col-md-12"><hr class="w-100"></div>{/if}
            <div class="col-md-12 mb-2">
                <div class="float-left">{:lang('v_reply')}：“ <span class="text-danger">{$rs.content|strip_tags|msubstr=0,15}</span> ”</div>
                <div class="float-right">
                    <a href="/{$lang}/{$mod_rs.urlroute}-{$mod_rs.routesign}{$mod_rs.id}.html" target="_blank"><i class="fa fa-eye"></i> {:lang('v_view')} {:lang('v_original')}</a>
                </div>
            </div>
            <div class="col-md-12 mb-2">
                <textarea name="content" id="content1a" style="width:100%; height:80px;" rows="5"></textarea>
            </div>
            <div class="col-md-12 mb-2">
                <div class="input-group date form_datetime">
                    <div class="input-group-prepend"><button type="button" class="btn btn-default">{:lang('v_reply')} {:lang('v_date')}</button></div>
                    <input name="addtime" readonly="readonly" type="text" class="form-control" value="{empty name="rs.addtime"}{php}echo date('Y-m-d H:i:s',time());{/php}{else /}{$rs.addtime|date='Y-m-d H:i:s'}{/empty}">
                    <span class="input-group-append">
                        <span class="btn btn-default date-set"><i class="fa fa-calendar-alt mr-1"></i></span>
                    </span>
                </div>
            </div>
            <div class="col-md-12 mt-2 text-center">
                <button type="button" class="do_ajax btn btn-success mr-4" onclick="javascript:do_ajax('#form_edit','.do_ajax','{:url('/comment/edit',['lang'=>$lang])}','{:url('/comment/index',['lang'=>$lang,'signid'=>input('signid')])}');"><i class="fas fa-check-circle mr-2"></i>{:lang('v_save')} {:lang('v_reply')}</button>
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times-circle mr-1"></i>{:lang('v_close')}</button>
            </div>
        </div>
    </form>
</div>
{include file="public/js_datetime_picker" /}
{include file="public/js_rich_text_small" /}
<script type="text/javascript">
    $('.self_modal').on('click', function(){
        $($(this).data("modal")+' .modal-content').load($(this).attr('href'));
    });
</script>